﻿@using Transport.Data
@using Transport.Infrastructure
@model Transport.Areas.Administrator.Models.ChangePasswordModel
@{
    ViewBag.Title = "Thay đổi mật khẩu";
}
@using (Html.BeginForm("ChangePassword", "User", FormMethod.Post))
{
    <div class="section-header">
        <div class="title">
            <img src="@Url.Content("~/Areas/Administrator/Content/images/ico-catalog.png")" alt="" />
            Thay đổi mật khẩu
        </div>
        <div class="options">
            <button type="submit" name="save" value="save" class="t-button">Lưu</button>
            @if (WorkContext.Roles.Contains(RoleType.Administrator))
            {
                <a href="@Url.Action("index")" class="t-button">Quay lại</a>
            }
        </div>
    </div>
    
    @Html.ValidationSummary(true)
    @Html.HiddenFor(model => model.UserId)
    <table width="100%">
        <tr>
            <td class="adminTitle">
                 @Html.Label("Mật khẩu mới")
                <span class="field_required">*</span>
            </td>
            <td class="adminData">
                @Html.PasswordFor(model => model.NewPassword)
                @Html.ValidationMessageFor(model => model.NewPassword)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                 @Html.Label("Xác nhận mật khẩu")
                <span class="field_required">*</span>
            </td>
            <td class="adminData">
                @Html.PasswordFor(model => model.ConfirmPassword)
                @Html.ValidationMessageFor(model => model.ConfirmPassword)
            </td>
        </tr>
    </table>
}


